package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallAttachmentGroup;
import com.appkubes.mall.core.po.MallAttachmentGroupExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallAttachmentGroupMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAttachmentGroupSqlProvider.class, method="countByExample")
    long countByExample(MallAttachmentGroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallAttachmentGroupSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallAttachmentGroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_attachment_group",
        "where attachment_group_key = #{attachmentGroupKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String attachmentGroupKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_attachment_group (attachment_group_key, app_key, ",
        "`name`, `uid`, `type`, ",
        "create_time, update_time, ",
        "version)",
        "values (#{attachmentGroupKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallAttachmentGroup record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallAttachmentGroupSqlProvider.class, method="insertSelective")
    int insertSelective(MallAttachmentGroup record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAttachmentGroupSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="attachment_group_key", property="attachmentGroupKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="uid", property="uid", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAttachmentGroup> selectByExampleWithRowbounds(MallAttachmentGroupExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAttachmentGroupSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="attachment_group_key", property="attachmentGroupKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="uid", property="uid", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAttachmentGroup> selectByExample(MallAttachmentGroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "attachment_group_key, app_key, `name`, `uid`, `type`, create_time, update_time, ",
        "version",
        "from mall_attachment_group",
        "where attachment_group_key = #{attachmentGroupKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="attachment_group_key", property="attachmentGroupKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="uid", property="uid", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallAttachmentGroup selectByPrimaryKey(String attachmentGroupKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAttachmentGroupSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallAttachmentGroup record, @Param("example") MallAttachmentGroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAttachmentGroupSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallAttachmentGroup record, @Param("example") MallAttachmentGroupExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAttachmentGroupSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallAttachmentGroup record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_attachment_group
     *
     * @mbg.generated
     */
    @Update({
        "update mall_attachment_group",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "`uid` = #{uid,jdbcType=INTEGER},",
          "`type` = #{type,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where attachment_group_key = #{attachmentGroupKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallAttachmentGroup record);
}